SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.vw_cantidadplazasrepetidashoy
AS
SELECT DISTINCT CUPOF, COUNT(*) AS Expr1, Licencia
FROM         dbo.vw_POFPaquetes
GROUP BY CUPOF, Licencia
HAVING      (Licencia IS NULL) AND (COUNT(*) > 1)
GO
GRANT SELECT ON  [dbo].[vw_cantidadplazasrepetidashoy] TO [SoloVer]
GO
